The online racing simulator
Searching in All forums
(951 results)
Yisc[NL]
S3 licensed
The 'Set_Schedule' module is nearly finished and therefor I have put up an Alpha version for testing.
If you are interested to see the module and want to do some testing, please go to server mentioned below.

- NO password is needed to join the server
- NO admin rights are required to test the module
- To start the module, press T and type: !ss
- It is NOT possible to drive on the server (you will get spectated)

Server: AB.nl[TST]

Let me know what you think about it and in case you found a problem (or think you have found one), let me know and give me the steps to reproduce the problem (if the Lapper logfile is inconclusive)

I will shut this server down tomorrow around 12:00 CEST, so you need to be 'quick' to be able to see and test the module.

Release notes:

- Complete re-write of the module for more efficient code
- Added DELETE button to delete single server name
- DELETE and LOAD buttons are dynamic now (no server name, no buttons)
- Number of races are dynamic now, when an empty line is found, script ends
- All entered information is saved instantly, so no need to save whole form
- Added car select GUI
- Added Weather,Wind,Qual length,Start order,Reset allowed,Cruise allowed
- Added copy-function so that several values be set as default and then copied
- Splitted password into event and regular password
- When an empty value is entered, the current value will be deleted from the database
- Added check for minimum race requirements (date,time,track,car(s),laps)
- Added input validaton for all fields
- Trackcode and car(s) can now be entered in lower case and are then automaticly put in upper case
- Module should now be multi-user
Last edited by Yisc[NL], .
Yisc[NL]
S3 licensed
What started as a re-write has turned into my best and most complex Lapper script I've written to date.
A lot of things have been changed or added since the last time I wrote about the progress.
Here's a quick summery:

- CLEAR has been changed to DELETE
- When a value is set as default, the button will go a bit brighter to show it is the default value
- Event number being red when vital information (Date,Time,Track,Cars,Laps) is missing
- ID number is automaticly created when date is entered into schedule*
- Password has been split into Event and Regular password
- Delete a whole event by clicking on the number using RIGHT mousebutton
- Events can be moved UP/DOWN by clicking on the number using LEFT mousebutton and then select which way it should move

* ID number can be linked up to the Handicap system, so that handicaps will be loaded automaticly, if needed

The things remaining on my To-Do list are:

- Add input validation when a Date is set
- Add input validation when a Time is set
- Add input validation when a Track is set
- Add input validation when a Car (or Cars) is/are set
- Add a Config screen when Set_Schedule is opened for the first time **

** Create some general settings when the schedule should be checked and server should be adjusted accordingly, Allow reset (or not) when no event is running, etc.
Last edited by Yisc[NL], .
Yisc[NL]
S3 licensed
For me it's simple.
Lapper is a free program and can be used by anyone.
So if the question is Lapper related, I will always try to help, as long as someone has done some work him self.
In this particular case, the OP hasn't done much him self and after asking for more information, has gone silent.
So not much to help with or go at, case closed.
Yisc[NL]
S3 licensed
Today I fixed a bunch of bugs I came across while testing the new script.
I also changed a minor thing related to storing/deleting servernames.
I've added the C(opy) button in the server name section, so that if you want to create a schedule for the server you are currently on, you can just press the C button and have that name copy/pasted into the server name field.
I've also added the C(opy) buttons to the Weather,Wind,Qual,Start,Reset and Cruise section.

The re-write and expanding of this module is nearly finished now.
Last edited by Yisc[NL], .
Yisc[NL]
S3 licensed
Small update today, a function to put a default value on some sort of clipboard and then use it in other fields.
In this example I pressed the D (Default) button next to '20:30 CEST' and am notified that the value is set as default time.
At that moment the D next to that value will start to blink and the other D's will dissapear.
Every line with an empty time field, will get a C button, which means C(opy) to past the saved value in that particular field.
This will save you the time of having to type the same information over and over again.
Yisc[NL]
S3 licensed
No, because that is part of the 'schedule' module.
Once, I have finished writing the 'schedule_set' module, I will go on to update the 'schedule' (which is only reading information and then action on that) module.
Yisc[NL]
S3 licensed
Although this is a very old thread, there is some new developement going on for the 'schedule_set' addon.
I first started cleaning out the current codebase and managed to bring it back by ~80%, before starting on some new features.
While the work is very much in progress, here's the changelog so far:

- Complete re-write of the module for more efficient code
- Added CLEAR button to clear single server name
- CLEAR and LOAD buttons are dynamic now (no server name, no buttons)
- Number of races are dynamic now, when an empty line is found, script ends
- All entered information is saved instantly, so no need to save whole form
- Added car select GUI
- Added Weather,Wind,Qual,Start order,Reset,Cruise

The car select GUI has some very nice functions.
When you select a car using the Left MouseButton (LMB) the name of the car will turn green and when you click it again using LMB, it will de-select and turn white again.
When you select a car using the Right MouseButton (RMB) the name of the car will turn red and when you click it again using RML, it will de-select and turn white again.
Green will mean that the car is available, while red means it is excluded, but those excludes are only working when using the car groups (cyan colored button).
Those car group buttons can only be clicked using the LMB and will go green when selected or white when not selected.

When pressing 'More options >>>' a new set of settings becomes available, while Password and Comment will be hidden.
You will be able to set the Weather, Wind speed, Length of Qualify, Starting order of the race, Resets of car allowed or not, Cruise (driving wrong way) allowed or not.
If you press '<<< Less options' those new settings will go hidden again and Password en Comment will be shown again.

All shown functions are working at the moment, but I have some more ideas I want to include in this update (some ideas will need the release of Lapper 7.0.4.8)

Let me know what you think about this and if there are any other things that should/could go into this module.
Last edited by Yisc[NL], .
Yisc[NL]
S3 licensed
Are you running a server using DCon?
If so, there's a config value to be set for saving replays:

/autosave=0 :MPR autosave (0-no / 1-manual / 2-auto)

You can also set a directory in which the replay will be stored:

/mprdir=X :set the data folder for mpr saving

On the servers I am running (using Dcon) the following settings are in place when it comes to replays:

/autosave=2
/mprdir=.\mpr\11-AB-S3L

Replays aren't uploaded, they are stored on the server in the MPR folder (or a sub-folder of MPR in case you created that and set the path to it) and will stay there until you manualy delete them.
Yisc[NL]
S3 licensed
Right, I think the script does what you want it to do (and probably a bit more, as I am not the kind of person to deliver just that, but always strive for perfection Shy )

Save the file in your 'Includes' folder and rename the extention to LPR
Then add a line in 'addonsused.lpr' to be able to use the file: include( "./limit_rejoins.lpr");

The script is seriously tested and well documented (well, I feel it is) so all should be good and clear.
If not, just ask and I will try to explain what is happening or fix the bug(s) in case there are any.

Yisc[NL]
S3 licensed
Thanks for the files for EditPlus.

I've placed them into: C:\Users\[USERNAME]\AppData\Roaming\EditPlus
Then I opened 'Preferences' in EditPlus and went to 'Settings & syntax'
Pressed "Add..." and created 'Lapper' as File type.
I added 'lpr' in the "File extensions" box and then linked the stx and acp file to this newly created file type.
As soon as I hit 'Apply' the syntax came alive.

Yisc[NL]
S3 licensed
Limited rejoins would be easy to code in Lapper.
I will try and write that script for you today.
Yisc[NL]
S3 licensed
I am coding Lapper with EditPlus (also write HTML and PHP with that when building sites).
No highlighting in there (for Lapper), but I don't mind that Smile
Yisc[NL]
S3 licensed
Lapper basicly is a scripting language developed by the early devs of Lapper (Gai-Luron and Kravy wrote most of what we currently have)
So you will find similarities with other languages, but in the end it's a language of its own Smile
Yisc[NL]
S3 licensed
No, Lapper isn't PHP, so you can't use any of the PHP functions.
Timing is handled through "RegisterScheduleAction" which can be customised to your needs.
My best source of information is scripts made by other people and 'Changes.txt' if you are looking for special functions and/or the right syntax for things.
Yisc[NL]
S3 licensed
Too bad you didn't make any money, but take the good points of the experience and build on them. Being a bit more visable next time and be able to spread the LFS-word (so to speak) is a bonus for the whole community. Keep it up.
Yisc[NL]
S3 licensed
This will be an ever lasting discussion.
If Scawen is working on phyiscs (and this takes a lot of time to get it together in the first place and then get it right after that) people are 'moaning' about wanting more content.
But if Scawen/Eric would decide to put time into creating content and then release that, people start to 'moan' about the time the new physics (and therefor release of Sirocco) will be released.
Personaly I think there is enough content in LFS (plenty of cars and tracks to choose from) and even the release of new content like Rockingham (or updated Blackwood etc.) made people bored a few weeks after that.

Bottom line is that Scavier will never be able to put up with the developement pace and budgets of big gaming companies (not that they want that, a case for them of been there, done that) so progress will always be (very) slow, compared to companies like IE or Codemasters.
The other side is that the things they do deliver are of the highest quality and if not, they give proper support.
Look at what those big companies put on the markets (half baked games, more like alpha's or earlier beta's), then 'support' that with a few patches to solve the biggest issues (if possible) and then move on to the next itteration of their game.
Read the Codemasters forum for example and see how bad F1 2017 is (which is the case every year) and compare that to the quality you will get in LFS.
Yisc[NL]
S3 licensed
Download was working yesterday evening, as I grabbed the new version from this site.
Yisc[NL]
S3 licensed
When writing code for Lapper, you basicly have two options to put your code in:

1) Write it directly in 'LFSLapper.lpr' which can be found in folder 'bin\default'
2) Write it in a seperate file, save that file in the 'bin\default\includes' folder and mention the newly written file in 'bin\default\includes\addonsused.lpr'

The second option is the best one, as it keeps the default script clean and by adjusting file 'addonsused.lpr' you can easily turn on/off scripts you have written.

With buttons there are two options as well:

openPrivButton - this will open a button only to be seen by the player that has triggered the event

openGlobalButton - this will be seen by all players and is triggered by the first player that triggered the event.

PrivButton is mainly used to display information that is player specific, while GlobalButton is used for general information

The syntax for both buttons is the same:

1 - Unique id for this button
2 - Left coordinate for this button ( 0-200 ) , $origL = (value between 0-200); - when this value is used, every next value can be made relative to this one (example: $origL + 5; )
3 - Top coordinate for this button ( 0-200 ) , $origT = (value between 0-200); - when this value is used, every next value can be made relative to this one (example: $origT + 5; )
4 - Width of the button ( 0-200 )
5 - Heigth of the button ( 0-200 )
6 - Space between line in multiline button
7 - Duration in seconds for the button to be displayed (use -1 if you don't want an automatic close)
8 - Format of the button, look at insim.txt for values
9 - Button caption, for multiline, separate each line with &
10 - Option name of the backcalled sub

When formatting a button, these are the codes you can use:

0 - transparent button
16 - light button
32 - dark button
64 - align text to left
128 - align text to right

If you want to make a light colored button with text aligned to the left, combine the codes to one new code, for example 16+64 = 80

When a button is clicked a next routine can be started and it's possible to know which mousebutton is used to click the button with.
This can be read using the $KeyFlags value in the sub-routine and can return the following values:

// CFlags byte : click flags

1 // left click
2 // right click
4 // ctrl + click
8 // shift + click

If left click and right click, you receive 2 + 1 = 3

That are the basics of creating a button, which hopefully make some sense.
Now back to your question about displaying a button when a zone is reached.
Let's say we register a zone on the basic Blackwood track (BL1):

RegisterZoneAction( "MyZone", "BL1" , 0 , SA_Test_1, "" );

This means that as soon as a player enters zone 0, the sub-routine 'SA_Test_1' will be executed.
As you can see, there's also "" in the RegisterZoneAction, which can be used to define a sub-routine to be executed when a player leaves zone 0.

The sub-routine could look like this:


<?php 
Sub SA_Test_1 
$userName$id )
    
openPrivButton"test_button",25,28,150,10,5,-1,0,"This is a test""" );
EndSub
?>


As you can see, a PrivButton is opened and has been given the name 'test_button'.
This name is important and should be unique, because you need that name to close the button at some point and if multiple buttons have the same name, they will all close when using that name.
Value 25 means that the button is starting from position 25 seen from the left side of the screen. (the screen for buttons is a 200 by 200 square, where the top left corner has coordinate 0,0)
Value 28 means that the button is starting from position 28 seen from the top of the screen.
Value 150 means that the button has a width of 150 (since it is starting 28 from the left, the end of the button is at position 178, which is within the range of 200.
Value 10 means that the button has a height of 10 (if you want to display text on the button, then it will take a height of 5, to display one line of text, 2 lines means a height of 10 is needed, ect. etc.)
Value 5 has to do with space between a multiline button, but in most cases 5 will do.
Value -1 means that the button won't close automaticly and will be waiting for the user to click on it and then execute the sub-routine.
Value 0 means that the button will be transparent.
Value 'This is a test' is the text that will be displayed on the button.
Value "" means that no further sub-routine will be executed when the player clicks the button.

Since we haven't specified a time (we used -1) after which the button will close automaticly and since whe haven't specified a sub-routine when the player clicks the button, it will mean the player is stuck with that button until he disconnects from the server, which isn't very useful.
So either we specify a time (in seconds) to automaticly close the button, or we specify a sub-routine to be executed when the player clicks the button.

Be carefull though, when players are driving their car using the mouse as control, such button will screw up their car control for as long as such button is on their screen.

I hope this post is useful to you, but don't hesitate to ask more questions if you have any.
Last edited by Yisc[NL], .
Yisc[NL]
S3 licensed
Congrats on yet another release.
Great work and plenty of new things to write scripts with.
Yisc[NL]
S3 licensed
Maybe explain a bit more what kind of help you are looking for.
Besides that, aren't there more then enough cruise servers already?
So why not join any of them, instead of creating something your self.
Unless you have some plans for something that isn't done by anyone else.
Yisc[NL]
S3 licensed
The problems with the site have been resolved, so new accounts will get an activation email again now.
Yisc[NL]
S3 licensed
Here's the script you asked for.
It counts the number of connected players and stores/retrieves the distance driven for each player.
The value is stored in the database every 30 seconds, but of course you could change that time.

Download the file, rename it to 'connect_dist.lpr' and place it in the 'includes' folder.
Then open file 'addonsused.lpr' and add the following line:

include( "./connect_dist.lpr");

Last edited by Yisc[NL], .
Yisc[NL]
S3 licensed
Wouldn't be too hard to write such script.
I will write it and post it here later today.
Yisc[NL]
S3 licensed
Quote from Skinzinho :Funny thing... People like you still helping cracker's. Oh god, why Face -> palm

Please see the private message I send you and let us keep the conversation about this matter in private as it won't help this section in any way to debate about it in public. Thank you.
Since the OP hasn't asked for any more help, I will close this thread now.
Yisc[NL]
S3 licensed
I did a quick test and besides being able to get the IPAddress when someone is joining the track, you can also obtain it using the OnConnectClose event.
This is de code I wrote to quickly test what is possible:


<?php 
CatchEvent OnConnect
$userName # Player event
    
OnConnect_IP_Saving();
EndCatchEvent


CatchSub OnConnectClose
$KeyFlags,$id )
      
OnConnectClose_IP_Saving();
EndCatchSub

CatchEvent OnNewPlayerJoin
$userName )  # Player event
    
OnNewPlayerJoin_IP_Saving();
EndCatchEvent

Sub OnConnect_IP_Saving
()
    
$userName GetCurrentPlayerVar"UserName" );
    
PrivMsg ("^7DEBUG OnConnect: " GetPlayerVar($userName,"IPAdress") );
EndSub

Sub OnConnectClose_IP_Saving
()
    
$userName GetCurrentPlayerVar"UserName" );
    
PrivMsg ("^7DEBUG OnConnectClose: " GetPlayerVar($userName,"IPAdress") );
EndSub

Sub OnNewPlayerJoin_IP_Saving
()
    
$userName GetCurrentPlayerVar"UserName" );
    
PrivMsg ("^7DEBUG OnNewPlayerJoin: " GetPlayerVar($userName,"IPAdress") );
EndSub
?>


And this is the result of that test:

FGED GREDG RDFGDR GSFDG